const logger = require("../utils/logger");
const {DOCUMENT_STORE_CROSS_ADDRESS:CADD,DOCUMENT_STORE_CROSS_ABI:CABI,DOCUMENT_STORE_CROSS_BIN:CBIN} = require('./compiledContracts/documentStoreCross');
const {deploy,send} = require("./compiledContracts")

const deployDocumentStore = async (storeName) => {
    let parameters = [storeName]
    return deploy(parameters,CABI,CBIN)
};

/**
const setManagerProxy = async (managerProxy) =>{
    return send("setManagerProxy(address)", [managerProxy],CADD,CABI);
}

const bindProxyHash = async(toChainId, targetHash)=>{
    return send("bindProxyHash(uint64,bytes)", [toChainId, targetHash],CADD,CABI);
}

const crossIssue = async(targetHash, toChainId)=>{
    return send("crossIssue(bytes,uint64)", [targetHash, toChainId],CADD,CABI);
}
 */

const issue = async(targetHash)=>{
    return send("issue(bytes32)", [targetHash],CADD,CABI);
}

module.exports = {
    deployDocumentStore,
    issue
}
